package chapter10;
//
public class Vehicle {
    //颜色
    private String colour;
    //品牌
    private String brand;
    //车牌
    private String number;
    //排量
    private double exhaust;
    //座位
    private int seat;
    //空构造器
    public Vehicle(){}
    public Vehicle(String colour, String brand  ,String number ,double exhaust ,int seat){
        this.colour = colour;
        this.brand = brand;
        this.number = number;
        this.exhaust = exhaust;
        this.seat = seat;

    }
    //方法 描述
    public void describe(){
        System.out.println("这是一辆"+brand+"的"+colour+"色的车， " +
                "车牌" + number +"    排量"+ exhaust+" "+seat+"个座位");
    }

    //访问修改
    public int getSeat() {
        return seat;
    }
    public void setSeat(int seat) {
        this.seat = seat;
    }
    public String getColour(){
        return colour;
    }
    public void setColour(String colour){
        this.colour = colour;
    }
    public String getBrand(){
        return brand;
    }
    public void setBrand(String brand){
        this.brand = brand;
    }
    public String getNumber(){
        return number;
    }
    public void setNumber(String number){
        this.number = number;
    }

    public double getExhaust(){
        return exhaust;
    }
    public void setExhaust(double exhaust){
        this.exhaust = exhaust;
    }
}
